Skip to content

Move CrateInfo computation after codegen_crate#156243

Open
bjorn3 wants to merge 1 commit intorust-lang:mainfrom
bjorn3:lto_refactors18
Open

Move CrateInfo computation after codegen_crate#156243
bjorn3 wants to merge 1 commit intorust-lang:mainfrom
bjorn3:lto_refactors18

Conversation

@bjorn3
Copy link
Copy Markdown
Member

@bjorn3 bjorn3 commented May 6, 2026

CrateInfo is only necessary during linking and non-local LTO.

Part of rust-lang/compiler-team#908

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 6, 2026

The GCC codegen subtree was changed

cc @antoyo, @GuillaumeGomez

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels May 6, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 6, 2026

r? @mu001999

rustbot has assigned @mu001999.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: codegen, compiler
  • codegen, compiler expanded to 73 candidates
  • Random selection from 19 candidates

@@ -1,5 +1,3 @@
error: crate `rmeta_meta` required to be available in rlib format, but was not found in this form
Copy link
Copy Markdown
Member Author

@bjorn3 bjorn3 May 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This error was already only emitted for crates that need to be linked or that perform LTO, not when compiling rlibs. There is still a decent error message about missing optimized MIR if MIR of upstream crates is necessary. And if that isn't necessary, this dependency format error will still be shown after codegen.

View changes since the review

@rust-log-analyzer

This comment has been minimized.

CrateInfo is only necessary during linking and non-local LTO.
@bjorn3 bjorn3 force-pushed the lto_refactors18 branch from fc84297 to da6e4d4 Compare May 6, 2026 14:51
Comment thread compiler/rustc_codegen_ssa/src/back/write.rs
@mu001999
Copy link
Copy Markdown
Member

mu001999 commented May 7, 2026

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 7, 2026
@bjorn3 bjorn3 added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 7, 2026
@mu001999
Copy link
Copy Markdown
Member

mu001999 commented May 7, 2026

@bors r+

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 7, 2026

📌 Commit da6e4d4 has been approved by mu001999

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 7, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request May 7, 2026
Move CrateInfo computation after codegen_crate

CrateInfo is only necessary during linking and non-local LTO.

Part of rust-lang/compiler-team#908
rust-bors Bot pushed a commit that referenced this pull request May 7, 2026
…uwer

Rollup of 5 pull requests

Successful merges:

 - #146273 (lint ImproperCTypes: refactor linting architecture (part 2))
 - #156024 (CFI: Fix LTO for `#![no_builtins]` crates with CFI)
 - #156243 (Move CrateInfo computation after codegen_crate)
 - #156245 (Move invocation_temp into OutputFilenames)
 - #156265 (Remove unused `ToStableHashKey` impls.)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request May 7, 2026
Move CrateInfo computation after codegen_crate

CrateInfo is only necessary during linking and non-local LTO.

Part of rust-lang/compiler-team#908
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants